package y.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import y.entity.MybatisUser;
import y.entity.NewResultType;

import java.util.List;

public interface UserMapper {
    //xml实现对一张表的数据进行CRUD
    List<MybatisUser> selectAllUser();
    int addUser(@Param("id")int id,@Param("name")String name,@Param("phone")String phone);
    int deleteUserById(int id);
    int updateUserById(@Param("id")int id,@Param("name")String name);


    //动态SQL语句
    MybatisUser sqlselectOneUser(MybatisUser mybatisUser);
    int findUserOrInsert(NewResultType newResultType);
    List<MybatisUser> sqlselectUser(int n);
    int UpdateUserPhone(@Param("list")List<Integer> ids, @Param("phone")String s);
}
